package org.itboys.basetemplate.entity;

import org.itboys.mongodb.entity.BaseLongIdEntity;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.NotSaved;

import java.util.Date;

/**
 * 收益详情记录实体类
 * 
 * @author weisky
 * 
 */
@Entity(value = "IncomeRecord", noClassnameStored = true)
public class IncomeRecord extends BaseLongIdEntity {

	private static final long serialVersionUID = 6416208979265589754L;

	private Long objId;// 订单id，只有生成了订单，才能有各种收益。
	private int objType;// 1-普通订单 2-服务订单
	private int type; //收益类型 1:消费佣金 2:提现(money存负数amount=0 isConfirm=1)
	private Double amount;// 不能提现的金额（也就是累计红包）
	private Double money;// 可提现的红包金额
	private Long userId;// 收益人的id，
	private Long fromUserId; //收益来源人Id
	private int isDeleted = 0;// 逻辑删除 1：无效 0：有效
	private int isConfirm = 0; // 0-已付款 1-确认收货 2-退款
	private Date createTime;

	@NotSaved
	private String orderNo;
	@NotSaved
	private String nickName;
	@NotSaved
	private String time;
	
	public Long getObjId() {
		return objId;
	}

	public void setObjId(Long objId) {
		this.objId = objId;
	}

	public int getObjType() {
		return objType;
	}

	public void setObjType(int objType) {
		this.objType = objType;
	}

	public Double getAmount() {
		return amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}

	public Double getMoney() {
		return money;
	}

	public void setMoney(Double money) {
		this.money = money;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getFromUserId() {
		return fromUserId;
	}

	public void setFromUserId(Long fromUserId) {
		this.fromUserId = fromUserId;
	}

	public int getIsDeleted() {
		return isDeleted;
	}

	public void setIsDeleted(int isDeleted) {
		this.isDeleted = isDeleted;
	}

	public int getIsConfirm() {
		return isConfirm;
	}

	public void setIsConfirm(int isConfirm) {
		this.isConfirm = isConfirm;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}
}
